home *** CD-ROM | disk | FTP | other *** search
/ Amiga CD-Sensation: Golden Games / Amiga CD-Sensation - Ausgabe 2 - Golden Games (1996)(GTI - Schatztruhe)(DE)[!].iso / Brain Activity / Conquest / Conquest2.def < prev    next >
Text File  |  1992-12-20  |  6KB  |  280 lines

  1. DEFINITION MODULE Conquest2;
  2.  
  3.  
  4.  
  5. IMPORT DosD;
  6.  
  7.  
  8.  
  9. CONST
  10.   maxTurns       =200;
  11.   bdsize         =15;
  12.   investCost     = 3;
  13.   maxVelocity    =(bdsize*15)/10;
  14.   maxWeapons     =20;
  15.   maxRange       =(bdsize*15)/10;
  16.   resCostFactor  =1.35;
  17.   initunit       =35;
  18.   initmoney      =30;
  19.   mbCost         = 8;
  20.   cruiserCost    =16;
  21.   scoutCost      = 6;
  22.   ambCost        =35;
  23.   battleShipCost =70;
  24.   cruiserGuns    = 7;
  25.   battleShipGuns =40;
  26.   scoutDefend    = 2;
  27.   transportDefend= 1;
  28.   nstars         =21;
  29.   initvel        = 1;
  30.   initrange      = 1;
  31.   initweap       = 1;
  32.   iuRatio        = 2;
  33.   blankLine      = "                              ";
  34.   tExploreProb   =10.0;
  35.   tExploreVar    = 5;
  36.   sExploreProb   =70.0;
  37.   sExploreVar    =10;
  38.   cExploreProb   =90.0;
  39.   cExploreVar    =10;
  40.   bExploreProb   =97.0;
  41.   bExploreVar    = 3;
  42.   initgrowthenemy= 0.7;
  43.   initgrowthplayer=0.4;
  44.  
  45.  
  46.  
  47. TYPE
  48.   IntType=LONGINT;
  49.  
  50.   Team=(ENEMY,player,none);
  51.  
  52.   Attribute=ARRAY Team OF IntType;
  53.  
  54.   TaskForce=
  55.     RECORD
  56.       x: IntType;
  57.       y: IntType;
  58.       xf: IntType;
  59.       yf: IntType;
  60.       s: IntType;
  61.       t: IntType;
  62.       c: IntType;
  63.       b: IntType;
  64.       dest: IntType;
  65.       eta: IntType;
  66.       origeta: IntType;
  67.       blasting: BOOLEAN;
  68.       withdrew: BOOLEAN;
  69.     END;
  70.  
  71.   PlanetPtr=POINTER TO Planet;
  72.   Planet=
  73.     RECORD
  74.       number: IntType;
  75.       capacity: IntType;
  76.       pSeeCapacity: IntType;
  77.       team: Team;
  78.       inhabitants: IntType;
  79.       iu: IntType;
  80.       mb: IntType;
  81.       amb: IntType;
  82.       conquered: BOOLEAN;
  83.       underAttack: BOOLEAN;
  84.       eSeeTeam: Team;        (* the team when the enemy last saw it *)
  85.       eSeeDefend: IntType;   (* the mbs when enemy last saw it      *)
  86.       pstar: IntType;
  87.       next: PlanetPtr;
  88.     END;
  89.  
  90.   Star=
  91.     RECORD
  92.       x: IntType;
  93.       y: IntType;
  94.       firstPlanet: PlanetPtr;
  95.       visit: ARRAY Team OF BOOLEAN;
  96.     END;
  97.  
  98.   TFArray=ARRAY Team,[0..27] OF TaskForce;
  99.   StarArray=ARRAY[0..nstars+1] OF Star;
  100.   Line=ARRAY[0..81] OF CHAR;
  101.   StarList=ARRAY[0..nstars+1] OF IntType;
  102.   RealStarList=ARRAY[0..nstars+1] OF LONGREAL;
  103.   BoolStarList=ARRAY[0..nstars+1] OF BOOLEAN;
  104.  
  105.   Option=(right,left,both);
  106.  
  107.  
  108.  
  109. TYPE
  110.   BoardType=
  111.     RECORD
  112.       enemy: CHAR;
  113.       star: CHAR;
  114.       tf: CHAR;
  115.     END;
  116.  
  117.  
  118. TYPE
  119.   Cursor=
  120.     RECORD
  121.       x: IntType;
  122.       y: IntType;
  123.     END;
  124.  
  125.  
  126.  
  127. VAR
  128.   distance:  ARRAY[0..nstars+1],[0..nstars+1] OF IntType;
  129.   tfStars:  ARRAY[0..nstars+1],Team OF IntType;
  130.   colStars: ARRAY[0..nstars+1],Team OF IntType;
  131.   enemyResearch: CHAR;
  132.  
  133.   board: ARRAY[0..bdsize+1],[0..bdsize+1] OF BoardType;
  134.  
  135.   stars: StarArray;
  136.  
  137.   tf: TFArray;
  138.  
  139.   growthRate: ARRAY Team OF LONGREAL;
  140.  
  141.   vel: Attribute;
  142.   curRange: Attribute;               (* current range *)
  143.   weapons: Attribute;
  144.   weaponResearch: Attribute;
  145.   rangeResearch: Attribute;
  146.   velocityResearch: Attribute;
  147.   weaponRequired: ARRAY[0..maxWeapons+1] OF IntType;
  148.   rangeRequired: ARRAY[0..maxRange+1] OF IntType;
  149.   velocityRequired: ARRAY[0..maxVelocity+1] OF IntType;
  150.   turn: IntType;
  151.   prodYear: IntType;
  152.   enemyArrival: BoolStarList;
  153.   enemyDepart: BoolStarList;
  154.   playerArrival: BoolStarList;
  155.   gameOver: BOOLEAN;
  156.   bottomField: IntType;
  157.  
  158.   cursor: Cursor;
  159.  
  160.   rawFile: DosD.FileHandlePtr;
  161.  
  162.  
  163.  
  164. PROCEDURE PrintPlanet(p: PlanetPtr; see: BOOLEAN);
  165.  
  166. PROCEDURE SetCursorPos(col,row: IntType);
  167.  
  168. PROCEDURE GetChar(VAR c: CHAR);
  169.  
  170. PROCEDURE GetLine(VAR iline: Line; VAR ind: IntType; onech: BOOLEAN);
  171.  
  172. PROCEDURE min(x,y: IntType): IntType;
  173.  
  174. PROCEDURE fmin(a,b: LONGREAL): LONGREAL;
  175.  
  176. PROCEDURE ClearScreen;
  177.  
  178. PROCEDURE PrintMap;
  179.  
  180. PROCEDURE ClearLeft;
  181.  
  182. PROCEDURE GetToken(VAR line: Line; VAR index,value: IntType; VAR token: CHAR);
  183.  
  184. PROCEDURE ResearchSummary;
  185.  
  186. PROCEDURE NewResearch;
  187.  
  188. PROCEDURE DoResearch(team: Team; field: CHAR; amt: IntType);
  189.  
  190. PROCEDURE AnyWarShip(team: Team; starnum: IntType): BOOLEAN;
  191.  
  192. PROCEDURE FindBestPlan(starnum: IntType; VAR size: IntType; VAR team: Team);
  193.  
  194. PROCEDURE CheckGameOver;
  195.  
  196. PROCEDURE UpdateBoard(x,y: IntType; option: Option);
  197.  
  198. PROCEDURE ZeroTF(tm: Team; tfNum: IntType);
  199.  
  200. PROCEDURE ClearField;
  201.  
  202. PROCEDURE JOWDispTF(num: IntType; name: CHAR);
  203.  
  204. PROCEDURE DisplayTF(taskf: TaskForce);
  205.  
  206. PROCEDURE Pause;
  207.  
  208. PROCEDURE PrintStar(stnum: IntType);
  209.  
  210. PROCEDURE DisplayForces(ennum,plnum: IntType;
  211.                          VAR enodds,plodds: LONGREAL;
  212.                          VAR battle: BOOLEAN);
  213.  
  214. PROCEDURE OnBoard(x,y: IntType);
  215.  
  216. PROCEDURE Lose(VAR ships: IntType;
  217.                VAR loseNone: BOOLEAN;
  218.                    typ: CHAR;
  219.                    percent: LONGREAL);
  220.  
  221. PROCEDURE FireSalvo(    attackTeam: Team;
  222.                      VAR task: TaskForce;
  223.                          tfnum: IntType;
  224.                          planet: PlanetPtr;
  225.                          firstTime: BOOLEAN);
  226.  
  227. PROCEDURE Revolt(starnum: IntType);
  228.  
  229. PROCEDURE EnemyAttack(starnum: IntType);
  230.  
  231. PROCEDURE GetTF(tm: Team; VAR i: IntType; starnum: IntType);
  232.  
  233. PROCEDURE JoinSilent(team: Team; VAR parent,child: TaskForce);
  234.  
  235. PROCEDURE ErrorMessage;
  236.  
  237. PROCEDURE PlayerSalvo(starnum: IntType; VAR battle: BOOLEAN);
  238.  
  239. PROCEDURE PrintColony;
  240.  
  241. PROCEDURE StarSummary;
  242.  
  243. PROCEDURE PrintTF(i: IntType);
  244.  
  245. PROCEDURE TFSummary;
  246.  
  247. PROCEDURE Help(which: IntType);
  248.  
  249. PROCEDURE SplitTF(VAR tfNum,newTF: IntType);
  250.  
  251. PROCEDURE MakeTF;
  252.  
  253. PROCEDURE JoinTF;
  254.  
  255. PROCEDURE PlayerAttack(starnum: IntType);
  256.  
  257. PROCEDURE SetDestination(tfNum: IntType; VAR error: BOOLEAN);
  258.  
  259. PROCEDURE WithDraw(starnum,plnum: IntType);
  260.  
  261. PROCEDURE PutStr(a: ARRAY OF CHAR);
  262.  
  263. PROCEDURE PutCh(c: CHAR);
  264.  
  265. PROCEDURE PutInt(n,w: LONGINT);
  266.  
  267. PROCEDURE PutReal(r: LONGREAL; w,d: LONGINT);
  268.  
  269. PROCEDURE CursorOff;
  270.  
  271. PROCEDURE CursorOn;
  272.  
  273. PROCEDURE TFBattle(starnum: IntType);
  274.  
  275. PROCEDURE GetStars(sStar: IntType; VAR slist: RealStarList; VAR count: IntType);
  276.  
  277.  
  278.  
  279. END Conquest2.
  280.